<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group ajax-append">
        <div class="col-xs-12 col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">基本设置</div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-title" data-rule="required" class="form-control" name="title" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('卡类型')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select id="c-card_type" data-rule="required" required multiple class="form-control selectpicker" name="card_type[]">
                                {foreach name="card_list" item="vo" key="key"}
                                <option value="{$vo['id']}">{$vo['name']}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('交易类型')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select id="c-transaction_type_ids" data-rule="required" required multiple class="form-control selectpicker" name="transaction_type_ids[]">
                                {foreach name="tran_list" item="vo"}
                                <option value="{$vo['id']}" data-test="66">{$vo['name']}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-rate_ids" class="control-label col-xs-12 col-sm-2">{:__('费率')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select id="c-rate_ids" data-rule="required" required multiple class="form-control selectpicker" name="rate_ids[]">
                                {foreach name="rate_list" item="vo"}
                                <option class="selected_tag" value="{$vo['id']}" data-test="66">{$vo['name']}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group ajax-append">
        <div class="col-xs-12 col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">分润设置</div>
                <div class="panel-body">
                    <div>
                        <table class="table table-striped table-bordered table-hover table-nowrap"
                               style="text-align: center;">
                            <tr>
                                <th style="text-align: center;">费率</th>
                                <th style="text-align: center;">分润(万几)</th>
                            </tr>
                            {foreach name="profit_list" item="vo"}
                            <tr>
                                <td>
                                    <input type="text" class="form-control" style="text-align: center;" name="profit_rate[]" value="{$vo.rate}">
                                </td>
                                <td>
                                    <input type="text" class="form-control" style="text-align: center;" name="profit[]" value="{$vo.profit}">
                                </td>
                            </tr>
                            {/foreach}
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group ajax-append">
        <div class="col-xs-12 col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">流量卡</div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('代理')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-flow_agent" data-rule="required" class="form-control" name="flow_agent" type="text">
                        </div>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('机构')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-flow_agency" data-rule="required" class="form-control" name="flow_agency" type="text">
                        </div>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('核心')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-flow_core" data-rule="required" class="form-control" name="flow_core" type="text">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group ajax-append">
        <div class="col-xs-12 col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">调价</div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('代理')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-adjust_agent" data-rule="required" class="form-control" name="adjust_agent" type="text">
                        </div>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('机构')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-adjust_agency" data-rule="required" class="form-control" name="adjust_agency" type="text">
                        </div>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('核心')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-adjust_core" data-rule="required" class="form-control" name="adjust_core" type="text">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group ajax-append">
        <div class="col-xs-12 col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">达标设置</div>
                <div class="panel-body">
                    <div>
                        <table class="table table-striped table-bordered table-hover table-nowrap"
                               style="text-align: center;">
                            <tr>
                                <th style="text-align: center;">认购等级</th>
                                <th style="text-align: center;">限制天数</th>
                                <th style="text-align: center;">消费金额</th>
                                <th style="text-align: center;">奖励</th>
                            </tr>
                            <tr>
                                <td>
                                    代理
                                    <input type="hidden" name="standard_role[]" value="agent">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_day[]" value="">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_money[]" value="">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_reward[]" value="">
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    机构
                                    <input type="hidden" name="standard_role[]" value="agency">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_day[]" value="">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_money[]" value="">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_reward[]" value="">
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    核心
                                    <input type="hidden" name="standard_role[]" value="core">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_day[]" value="">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_money[]" value="">
                                </td>
                                <td>
                                    <input type="text" class="form-control" name="standard_reward[]" value="">
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
<!--    =============达标设置，勿删除===============-->
<!--    <div class="form-group ajax-append">-->
<!--        <div class="col-xs-12 col-sm-12">-->
<!--            <div class="panel panel-info">-->
<!--                <div class="panel-heading">达标设置（区间）</div>-->
<!--                <div class="panel-body">-->
<!--                    <div>-->
<!--                        {if $is_admin}-->
<!--                        <div id="toolbars" class="toolbar">-->
<!--                            <a id="more" href="javascript:;" class="btn btn-success btn-add" title="{:__('批量')}"><i-->
<!--                                    class="fa fa-plus"></i>-->
<!--                                {:__('再加一条')}</a>-->
<!--                        </div>-->
<!--                        {/if}-->
<!--                        <table class="table table-striped table-bordered table-hover table-nowrap standard-table"-->
<!--                               style="text-align: center;">-->
<!--                            <tr>-->
<!--                                <th style="text-align: center;">天数(开始)</th>-->
<!--                                <th style="text-align: center;">天数(结束)</th>-->
<!--                                <th style="text-align: center;">消费金额</th>-->
<!--                                <th style="text-align: center;">奖励(代理)</th>-->
<!--                                <th style="text-align: center;">奖励(机构)</th>-->
<!--                                <th style="text-align: center;">奖励(核心)</th>-->
<!--                                <th style="text-align: center;">操作</th>-->
<!--                            </tr>-->
<!--                            <tr>-->
<!--                                <td>-->
<!--                                    <input type="text" class="form-control" name="day_start[]" value="">-->
<!--                                </td>-->
<!--                                <td>-->
<!--                                    <input type="text" class="form-control" name="day_limit[]" value="">-->
<!--                                </td>-->
<!--                                <td>-->
<!--                                    <input type="text" class="form-control" name="money[]" value="">-->
<!--                                </td>-->
<!--                                <td>-->
<!--                                    <input type="text" class="form-control" name="standard_agent[]" value="">-->
<!--                                </td>-->
<!--                                <td>-->
<!--                                    <input type="text" class="form-control" name="standard_agency[]" value="">-->
<!--                                </td>-->
<!--                                <td>-->
<!--                                    <input type="text" class="form-control" name="standard_core[]" value="">-->
<!--                                </td>-->
<!--                                <td>-->
<!--                                </td>-->
<!--                            </tr>-->
<!--                        </table>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="status" type="radio" value="{$key}" {in name="key" value="1" }checked{/in} /> {$vo}</label>
                {/foreach}
                <input type="hidden" name="product_id" value="{$product_id}">
                {if !$is_admin}
                <input type="hidden" name="policy_id" value="{$policy_id}">
                {/if}
            </div>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
